﻿using System;

namespace ADDDF.Infrastructure.Specifications.Experimental
{
    public abstract class Specification<TCandidate> : ISpecification<TCandidate>
    {
        private bool _hasBeenAddedToComposite;

        public Specification()
        {
            _hasBeenAddedToComposite = false;
        }

        #region ISpecification<T> Members

        public abstract bool IsSatisfiedBy(TCandidate candidate);

        public bool HasBeenAddedToComposite
        {
            get { return _hasBeenAddedToComposite; }
            set { _hasBeenAddedToComposite = value; }
        }

        #endregion
    }
}
